package com.wings4.app

class ApplicationController {
    def securityService;

    def index() {

//        def currentDate = DateUtil.format(new Date());
//        def currenttimestamp = DateUtil.parse(currentDate).toTimestamp()
//        def lateAttendanceCount = AttendanceRegister.countByJobDateAndRemark(currenttimestamp, "late")
//        def totalLeaveRequest = LeaveRegister.countByApplyDateBetween(currenttimestamp,currenttimestamp+1)
//        def acceptedLeaveRequest = LeaveRegister.countByApplyDateBetweenAndLeaveStatus(currenttimestamp,currenttimestamp+1, 1)
//        def rejectedLeaveRequest = LeaveRegister.countByApplyDateBetweenAndLeaveStatus(currenttimestamp,currenttimestamp+1, 0)
//        def pendingLeaveRequest = LeaveRegister.countByApplyDateBetweenAndLeaveStatus(currenttimestamp,currenttimestamp+1, 2);
//        def presentEmployeeCount = AttendanceRegister.countByJobDateAndRemark(currenttimestamp, "present")
//        int absentAttendanceCount=Employee.countByActive(true)-presentEmployeeCount-lateAttendanceCount;
//        render(view: "index", model: [leaveCount: totalLeaveRequest,acceptedLeaveCount: acceptedLeaveRequest,pendingLeaveRequest:pendingLeaveRequest?:0,rejectedLeaveCount: rejectedLeaveRequest,presentEmployeeCount: presentEmployeeCount,lateEmployeeCount: lateAttendanceCount,absentEmployeeCount:absentAttendanceCount,title : "ERP System - Ocean"]);
        render(view:"index") ;
    }
    def save(){

    }
}
